<template>
    <div>
<h2>门店列表</h2>
<table class="table table-bordered">
    <tbody>
        <tr class="bg-primary">
            <td>Id</td>
            <td>门店名称</td>
        </tr>



        <tr v-for="item in shopList" :key="item.Id">
            <td>{{item.Id}}</td>
            <td>{{item.ShopName}}</td>
        </tr>
    </tbody>
</table>
    </div>
</template>

<script setup lang="ts">
import { ref,reactive, onMounted} from 'vue'
import axios from 'axios'
import { useRoute,useRouter } from 'vue-router'
const route = useRoute()    
const router = useRouter()



//门店列表
const shopList:any = ref([])
onMounted(()=>{
    GetList();//门店列表
})


const GetList = ()=>{
    //请求门店列表
axios({

url:'https://localhost:7059/api/DisCount/ShopList',
method:'get',
})
.then((res)=>{
    console.log(res)
    shopList.value = res.data;
})
.catch((err)=>{
    console.log(err)
})


}
</script>

<style scoped>

</style>